package com.pingan.license.utils;


import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;
import org.springframework.stereotype.Component;

/**
 * @AUTHOR:LIUCHAO; 单例模式下的证书管理器
 * @DATE: 2020/12/1 11:02
 */
@Component
public class LicenseManagerHolder {
    private static LicenseManager licenseManager;
    private LicenseManagerHolder(){}
    public static synchronized  LicenseManager getLicenseManager(LicenseParam param)
    {
        if(licenseManager==null)
        {
            licenseManager=new LicenseManager(param);
        }
        return licenseManager;
    }

}
